import { FMVCS } from "../../fgui/fmvc/FMVCS";
import LoginCtrl from "./LoginCtrl";
import { NetDefine } from "../../gamenet/protobufs/NetDefine";
import { Platform } from "../../platform/Platform";

export default class LoginView extends FMVCS.FView {
    clickHandlers() {
        return [
            [this._views[`btnGuest`], this.onBtnGuestClick, this],
            [this._views[`btnWeChat`], this.onBtnWeChatClick, this],
        ];
    }

    onBtnGuestClick() {
        LoginCtrl.instance.userLogin(NetDefine.eLoginType.Guest);
    }

    onBtnWeChatClick() {
        LoginCtrl.instance.userLogin(NetDefine.eLoginType.WeChat);
    }
}